package com.twohand.admin.Entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@ApiModel("菜单权限表")
@TableName("menu")
@Data
public class Menu extends BaseEntity{
    /** menu_id */
    @ApiModelProperty(name = "menu_id",notes = "")
    private Integer id ;
    /** 父级id 0为父级 */
    @ApiModelProperty(name = "父级id 0为父级",notes = "")
    private Integer pid ;
    /** routes名称 */
    @ApiModelProperty(name = "routes名称",notes = "")
    private String name ;
    /** 菜单名称 */
    @ApiModelProperty(name = "菜单名称",notes = "")
    private String cname ;
    /** 菜单路径 */
    @ApiModelProperty(name = "菜单路径",notes = "")
    private String path ;
    /** componentPath */
    @ApiModelProperty(name = "视图路径",notes = "")
    private String cpath ;
    /** 标识需要的权限如 user:list:add */
    @ApiModelProperty(name = "标识需要的权限如 user:list:add",notes = "")
    private String perms ;
    /** 类型 0目录 1菜单 2 按钮 */
    @ApiModelProperty(name = "类型 0目录 1菜单 2 按钮",notes = "")
    private Integer type ;
    /** 图标名称 */
    @ApiModelProperty(name = "图标名称",notes = "")
    private String icon ;
    /** 是否添加到tabs栏 0否 1是 */
    @ApiModelProperty(name = "是否添加到tabs栏 0否 1是",notes = "")
    private Integer addtab ;
    /** 0 否 1是 tabs是否可关闭 */
    @ApiModelProperty(name = "0 否 1是 tabs是否可关闭",notes = "")
    private Integer close ;
    /** 0 否 1是 是否缓存页面 */
    @ApiModelProperty(name = "0 否 1是 是否缓存页面",notes = "")
    private Integer keep ;
    /** 排序权重 */
    @ApiModelProperty(name = "排序权重",notes = "")
    private Integer weight ;
    @ApiModelProperty(name = "是否在左侧菜单中显示该菜单")
    Integer showOnMenu;
    @TableField(exist = false)
    List<?> children = new ArrayList<>(0);
}
